<!--sidebar-menu-->
<div id="sidebar" class="clearfix">
  <ul style="display: block;">{% include "common/menu.html" %}</ul>
</div>
<!--end sidebar-menu-->
<div id="content">
  <div class="container-fluid" style="padding: 0;">
    <div class="widget-box tab-tabs" >
      <div class="widget-title">
        <ul class="nav nav-tabs">{% include "common/tab.html" %}</ul>
      </div>
      <div class="widget-content tab-content">
        <div id="tab1" class="tab-pane active">
          <div class="container-fluid">
            <div class="row-fluid" style="margin: 20px 0;overflow: hidden;"></div>
            <div class="row-fluid">
              <div class="content-box content-box-padding" >
                <p style="font-size:20px;">给用户发放座驾:</p>
                <form action='' method='post'>
                  <span style="width:80px;display:inline-block;text-align:right;font-size:14px;">用户uid：</span>
                  <input type="text" id ="uid" style="font-size:14px;"/>
                  <br/>
                  <span style="width:80px;display:inline-block;text-align:right;font-size:14px;">座驾类型：</span>
                  <select id="carId" style="width: 100px;">
                    {% for province in cars %}
                    <option value="{{ province['id'] }}">{{ province['name'] }}</option>
                    {% endfor %}
                  </select>
                  <br/>
                  <span style="width:80px;display:inline-block;text-align:right;font-size:14px;">天数：</span>
                  <input style="font-size:14px;" type="text" id="day" value="10">
                  <input type='hidden' name='act' value='1'/>
                  <br/>
                  <br/>
                  <button type="button" class="" style="" onclick="sendCarSubmit()">确定</button>
                </form>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

<script type="text/javascript">
function sendCarSubmit(){
     var data={};
     data.uid = $('#uid').val();
     data.carId = $('#carId').val();
     data.day = $('#day').val();
    $.ajax({
        type:"POST",
        data:data,
        url:'',
        dataType:'json',
        success:function(res){
            if(res.code == 0) {
                alert('操作成功');
                location.reload();
            }else{
                 alert(res.info);
            }
        }
   });
}
</script>